#!/bin/sh -e

#[ -f /etc/hosts ] && exit 0

if [ -f /tmp/etc/hosts ]; then
    if [ -f /tmp/hosts ]; then
        cp /tmp/etc/hosts /tmp/
    	if [ $? -ne 0 ]; then
    	    echo "cp file failed,exit"
    	else
    	    echo "cp overr file succeed,exit"
    	fi
    else
       cp /tmp/etc/hosts /tmp/ 
       if [ $? -ne 0 ]; then
    	    echo "cp file failed,exit"
    	else
    	    echo "cp new file succeed,exit"
    	fi
    fi
else
    echo "No such file,exit"
fi